Skip to main content

Token Contract

Contract Functions:

1. Init

Signature

function init(
address _identityRegistry,
address _compliance,
string memory _name,
string memory _symbol,
uint8 _decimals,
address _onchainID
) external

Working:

Initializes the contract with given parameters.

ParametersTypeDescription
_identityRegistryaddressAddress of the Identity registry
_complianceaddressAddress of the compliance contract
_namestringName of the token
_symbolstringSymbol of the token
_decimalsuint8Decimals of the token
_onchainIDaddressAddress of the on-chain ID of the token

2. Force Transfer

Signature

function forcedTransfer(
address _from,
address _to,
uint256 _amount
) public

Working:

This function helps the Agent with Role to transfer frozen tokens to a whitelisted address without any approval.

ParameterTypeDescription
_fromaddressAddress from whom tokens should be transferred
_toaddressAgent address to whom tokens should be transferred
_amountnumberAmount of Frozen tokens that needs to be transferred

3. Batch Forced Transfer

Working:

This function helps the Agent with Role to transfer frozen tokens from more than 1 user to a whitelisted address without any approval.

Signature

function batchForcedTransfer(
address[] calldata _fromList,
address[] calldata _toList,
uint256[] calldata _amounts
) external
ParameterTypeDescription
_fromlistArray of addressesAddresses from whom tokens should be transferred
_toListArray of addressesWhitelisted address to whom tokens should be transferred
_amountArray of numbersAmounts of Frozen tokens that need to be transferred

4. Mint

Working:

This function helps the Agent with Role to mint tokens to a user address.

Signature

function mint(
address _to,
uint256 _amount
) public
ParameterTypeDescription
_toaddressAddress to which tokens should be minted
_amountnumberNumber of tokens that should be minted.

5. Batch Mint

Working:

This function helps the Agent with Role to mint tokens from more than 1 user address.

Signature

function batchMint(
address[] calldata _toList,
uint256[] calldata _amounts
) external
ParameterTypeDescription
_toListArray of addressesAddresses to which tokens should be minted
_amountsArray of numberNumber of tokens that should be minted.

6. Burn

Working:

This function helps the Agent with Role to burn tokens from a user address.

Signature

function burn(
address _userAddress,
uint256 _amount
) public
ParameterTypeDescription
_userAddressaddressAddress from which tokens should be burned
_amountnumberNumber of tokens that should be burned.

7. Batch Burn

Working:

This function helps the Agent with Role to burn tokens from more than 1 user address.

Signature

function batchBurn(
address[] calldata _userAddresses,
uint256[] calldata _amounts
) external
ParameterTypeDescription
_userAddressesArray of addressesAddresses to which tokens should be burned
_amountsArray of numberNumber of tokens that should be burned.

8. Freeze Partial Tokens

Working:

This function helps the Agent with Role to freeze tokens from the user address.

Signature

function freezePartialTokens(
address _userAddress,
uint256 _amount
) public
ParameterTypeDescription
_userAddressaddressAddress from which tokens should be frozen
_amountnumberNumber of tokens that should be frozen.

9. Batch Freeze Partial Tokens

Working:

This function helps the Agent with Role to freeze partial tokens from more than 1 user address.

Signature

function batchFreezePartialTokens(
address[] calldata _userAddresses,
uint256[] calldata _amounts
) external
ParameterTypeDescription
_userAddressesArray of addressesAddresses to which tokens should be frozen
_amountsArray of numberNumber of tokens that should be frozen.

10. UnFreeze Partial Tokens

Working:

This function helps the Agent with Role to unFreeze tokens from the user address.

Signature

function unfreezePartialTokens(
address _userAddress,
uint256 _amount
) public
ParameterTypeDescription
_userAddressaddressAddress from which tokens should be unfrozen
_amountnumberNumber of tokens that should be unfrozen.

11. Batch unFreeze Partial Tokens

Working:

This function helps the Agent with Role to unFreeze partial tokens from more than 1 user address.

Signature

function batchUnfreezePartialTokens(
address[] calldata _userAddresses,
uint256[] calldata _amounts
) external
ParameterTypeDescription
_userAddressesArray of addressesAddresses to which tokens should be unfrozen
_amountsArray of numberNumber of tokens that should be unfrozen.